<?php
/**
 * User:chendenan
 * Created On 2022/3/14 0014 20:37
 */
namespace app\common\lib;

class Time{
    /**
     * 用户登录过期时间
     * @param $type 1=7天 2=30天
     * @return float|int
     */
    public static function userLoginExpiresTime($type = 2){
        $type = !in_array($type,[1,2]) ? 2 : $type;
        if($type == 1){
            $day =  7 ;
        }elseif($type==2){
            $day =  30 ;
        }
        return $day * 24 * 3600 ;
    }
}